package foodmaterial.entity;

import foodmaterial.action.valid.ObjectNullValid;

import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import java.io.Serializable;

public class MealsTypeTemplateDetails implements Serializable {
    private static final long serialVersionUID = -8113242110732748564L;
    private Long id ;
    private Long templateId ;
    private String templateName ;
    @ObjectNullValid(message="食材不能为空")
    private Long foodMaterialId ;
    private String foodMaterialName ;
    private Double energy ;// '能量',
    private Double protein; // '蛋白质',
    private Double fat; //'脂肪',
    private Double carbohydrate;// '碳水化合物',
    private Double grossMargin ;//毛利润，前端使用，后端不使用
    private String unitName ;
    @ObjectNullValid(message="模板食材数量不能为空")
    @Min(value = 1,message = "模板食材数量最小是1")
    @Max(value=500,message = "模板食材数量最大是500")
    private Integer amount ;
    private Double buyPrice ;
    private Double salePrice ;
    private Boolean originalProcess ;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Long getTemplateId() {
        return templateId;
    }

    public void setTemplateId(Long templateId) {
        this.templateId = templateId;
    }

    public String getTemplateName() {
        return templateName;
    }

    public void setTemplateName(String templateName) {
        this.templateName = templateName;
    }

    public Long getFoodMaterialId() {
        return foodMaterialId;
    }

    public void setFoodMaterialId(Long foodMaterialId) {
        this.foodMaterialId = foodMaterialId;
    }

    public String getFoodMaterialName() {
        return foodMaterialName;
    }

    public void setFoodMaterialName(String foodMaterialName) {
        this.foodMaterialName = foodMaterialName;
    }

    public Integer getAmount() {
        return amount;
    }

    public void setAmount(Integer amount) {
        this.amount = amount;
    }

    public Double getBuyPrice() {
        return buyPrice;
    }

    public void setBuyPrice(Double buyPrice) {
        this.buyPrice = buyPrice;
    }

    public Double getSalePrice() {
        return salePrice;
    }

    public void setSalePrice(Double salePrice) {
        this.salePrice = salePrice;
    }

    public Double getEnergy() {
        return energy;
    }

    public void setEnergy(Double energy) {
        this.energy = energy;
    }

    public Double getProtein() {
        return protein;
    }

    public void setProtein(Double protein) {
        this.protein = protein;
    }

    public Double getFat() {
        return fat;
    }

    public void setFat(Double fat) {
        this.fat = fat;
    }

    public Double getCarbohydrate() {
        return carbohydrate;
    }

    public void setCarbohydrate(Double carbohydrate) {
        this.carbohydrate = carbohydrate;
    }

    public Double getGrossMargin() {
        return grossMargin;
    }

    public void setGrossMargin(Double grossMargin) {
        this.grossMargin = grossMargin;
    }

    public String getUnitName() {
        return unitName;
    }

    public void setUnitName(String unitName) {
        this.unitName = unitName;
    }

    public Boolean getOriginalProcess() {
        return originalProcess;
    }

    public void setOriginalProcess(Boolean originalProcess) {
        this.originalProcess = originalProcess;
    }
}
